<?php
/**
 * Notes:
 * Created by PhpStorm.
 * Author: TS
 * Date: 2019/10/3
 * Time: 22:12
 */

namespace app\model;


use think\Model;

class UserReal extends Model
{
    public function add($data){
        return self::create($data);
    }
    public function edit($user_real_id,$data){
        return self::update($data.['user_real_id' => $user_real_id]);
    }
    public function editByUserId($user_id,$data){
        return self::update($data,['user_id' => $user_id]);
    }
    public function getByUser($user_id){
        return self::get($user_id);
    }
    public function getByUserId($user_id){
        return self::get(['user_id' => $user_id]);
    }
    public function getAll(){
        return self::select();
    }

}